home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 June / 1984-06.d64 / word scramble_vi (.txt) < prev   
Commodore BASIC  |  2022-09-20  |  2KB  |  70 lines

  1. 10 print"[147]":poke36879,8:print"word scramble":poke36878,15
  2. 20 gosub1000:poke36879,27:print"[147]"
  3. 25 print"each player taking":print"turns enters a common"
  4. 30 print"word (max.10 letters).";
  5. 35 print"the computer will then";:print"scramble the word and"
  6. 40 print"print it."
  7. 45 print"you have three minutes";:print"to find it."
  8. 50 print"if found within the":print"allotted time,you will";
  9. 55 print"be given 50 points.":print"every wrong guess that";
  10. 60 print"you make will cost":print"you 10 points."
  11. 65 print:print:print:print"[156]press space bar[146]"
  12. 70 geta$:ifa$=""then70:c=0
  13. 80 print"[147]player # 1's name":inputp$(0)
  14. 85 print:print:print"player # 2's name":inputp$(1)
  15. 90 print:print"[156]"p$(c)",":print"enter word to be":print"scrambled:[146]"
  16. 92 w$="":inputw$:ifw$=""thenprint"[145]";:goto92
  17. 95 iflen(w$)>10thenprint"more then 10 letters![146][145][145][145][145][145][145][145]"::goto90
  18. 100 gosub200
  19. 110 gosub300
  20. 120 t(c)=t(c)+s(c)
  21. 130 gosub400:fori=1to10:b$(i)="":next
  22. 140 goto90
  23. 200 fori=1tolen(w$)
  24. 210 a$(i)=mid$(w$,i,1)
  25. 220 next
  26. 230 c$="":fori=1tolen(w$)
  27. 240 r=int(rnd(1)*len(w$)+1)
  28. 250 ifb$(r)<>""then240
  29. 260 b$(r)=a$(i)
  30. 270 next
  31. 271 fori=1tolen(w$):c$=c$+b$(i):next
  32. 272 ifc$=w$andlen(w$)<>1thenfori=1tolen(w$):b$(i)="":next:goto230
  33. 275 print"[147]word hasbeen scrambled[146]"
  34. 280 print"press space barwhen ready"
  35. 285 getc$:ifc$=""then285
  36. 290 print"[147]";
  37. 295 fori=1tolen(w$):print"";b$(i);:next
  38. 298 return
  39. 300 x=51:s(c)=50
  40. 310 ti$="000000"
  41. 320 print:print:print:print
  42. 325 sc=7885:cc=38605
  43. 330 fori=1tolen(w$)
  44. 335 pokesc,99:pokecc,2
  45. 340 getc$
  46. 350 print""mid$(ti$,4,1)" [146]minutes  "right$(ti$,2)" [146]seconds"
  47. 355 ifti$="000300"thengosub500:goto390
  48. 360 ifc$=""then340
  49. 365 print""
  50. 370 ifc$=a$(i)thenprinttab(x)a$(i);:poke36875,200:fort=1to100:next:poke36875,0:goto380
  51. 375 ifs(c)<10thengosub550:goto390
  52. 378 ifc$<>a$(i)thens(c)=s(c)-10:poke36877,220:fort=1to100:next:poke36877,0:goto335
  53. 380 x=x+1:sc=sc+1:cc=cc+1:next
  54. 390 return
  55. 400 ifc<>1thenc=1:return
  56. 410 print"[147]scores[146]"
  57. 420 print"[163][163][163][163][163][163]"
  58. 430 print""p$(0),p$(1)
  59. 440 printt(1),t(0)
  60. 450 c=0:return
  61. 500 print"[147]your time is up.[146]"
  62. 510 print"word was:"w$".":s(c)=0
  63. 520 fort=1to5000:next:return
  64. 550 print"you ran out of points.[146]"
  65. 560 print"[156]word was:"w$"."
  66. 570 fort=1to2000:next
  67. 580 return
  68. 1000 fors=250to235step-1:poke36874,s:poke36878,s-235:fort=1to100:nextt,s
  69. 1010 poke36874,0:poke36878,15:return
  70.